﻿<UserControl x:Class="Supremacy.Client.OptionsPages.AudioOptionsPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:s="http://schemas.startreksupremacy.com/xaml/core"
             xmlns:scc="http://schemas.startreksupremacy.com/xaml/presentation">
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <Label Grid.Column="0"
           Grid.Row="0"
           Content="{s:StringResource SETTINGS_MUSIC_VOLUME}"
           VerticalAlignment="Center" />
    <DockPanel Grid.Column="1"
               Grid.Row="0"
               LastChildFill="True"
               Margin="6,0,0,0">
      <RepeatButton DockPanel.Dock="Left"
                    Margin="0,0,4,0"
                    Command="{x:Static s:BlockBar.DecrementCommand}"
                    CommandTarget="{Binding ElementName=MusicVolumeBlockBar}"
                    Style="{StaticResource BlockBarDecrementButtonStyle}" />
      <Label DockPanel.Dock="Right"
             Content="{Binding Source={x:Static scc:ClientSettings.Current}, Path=(scc:ClientSettings.MusicVolume), Mode=OneWay, Converter={StaticResource FormatStringConverter}, ConverterParameter='0.%'}"
             HorizontalAlignment="Right"
             VerticalAlignment="Center"
             Width="48" />
      <RepeatButton DockPanel.Dock="Right"
                    Margin="4,0,0,0"
                    Command="{x:Static s:BlockBar.IncrementCommand}"
                    CommandTarget="{Binding ElementName=MusicVolumeBlockBar}"
                    Style="{StaticResource BlockBarIncrementButtonStyle}" />
      <s:BlockBar x:Name="MusicVolumeBlockBar"
                  Height="28"
                  BlockCount="16"
                  BlockMargin="4"
                  Value="{Binding Source={x:Static scc:ClientSettings.Current}, Path=(scc:ClientSettings.MusicVolume), Mode=TwoWay}" />
    </DockPanel>
  </Grid>
</UserControl>
